<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>let const</title>
	</head>
	<body>
	 <script>
		 {
			var a=1;
			let b=2;
		 }
		 console.log(a);//a
		// console.log(b);//Uncaught ReferenceError: b is not defined
		 
		 if(true){
			 data=123;
			 var data;
		 }
		 
		 /* if(true){
			 name="abc";//Uncaught ReferenceError: Cannot access 'name' before initialization
			 let name;
		 } */
		 
		 const obj={"id":1001};
		 obj.id=1002;
		 
		 var varTest;
		 
		 debugger
	 </script>
	</body>
</html>
